package com.google.android.apps.skipbot;

import android.os.AsyncTask;

/**
 * Interface to run a series of robot movements.
 */
public abstract class RobotMovementSequence {

  protected final RobotConfig robotConfig;
  protected final RobotController robotController;

  /**
   * Creates a robot movement sequence.
   * 
   * @param robotConfig robot configuration
   * @param robotController robot controller that enables robot movements
   */
  public RobotMovementSequence(RobotConfig robotConfig, RobotController robotController) {
    this.robotConfig = robotConfig;
    this.robotController = robotController;
  }

  /**
   * Runs the movement sequence inside of an asynchronous task.
   * 
   * @param asyncTask the asynchronous task that the sequence will run in
   */
  public abstract void run(AsyncTask<RobotMovementSequence, Integer, Boolean> asyncTask);

}
